package org.backend.service;

import org.backend.pojo.entity.Transaction;
import org.backend.pojo.dto.TransactionCreateDTO;
import org.backend.pojo.vo.CategoryStatisticsVO;
import org.backend.pojo.vo.MonthStatisticsVO;
import org.backend.pojo.vo.TransactionForPayVO;
import org.backend.pojo.vo.TransactionWithProductsVO;
import org.backend.utils.ApiResponse;

import java.util.List;

public interface TransactionService {

    ApiResponse<Integer> create(TransactionCreateDTO transactionCreateDTO);

    ApiResponse<List<TransactionWithProductsVO>> getTransaction(Transaction transaction);

    ApiResponse<TransactionForPayVO> getTransactionForPay(Transaction transaction);

    ApiResponse<String> delete(Transaction transaction);

    ApiResponse<String> payment(Transaction transaction);

    ApiResponse<TransactionWithProductsVO> getTransactionForOrder(Transaction transaction);

    List<MonthStatisticsVO> chart(String openid, int year, int month);

    List<CategoryStatisticsVO> categoryChart(String openid);
}
